home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games 1996 December
/
Amiga Games 1996 #12.iso
/
rexx
/
newarc.dopus5
< prev
Wrap
Text File
|
1996-04-30
|
1KB
|
52 lines
/*
$VER: NewArc.dopus5 1.0 (30.4.96)
Written by Edmund Vermeulen (edmundv@grafix.xs4all.nl).
ARexx script for Directory Opus 5 to create a new (empty) archive.
The archive may be of the LhA or LZX type. Default is LhA.
Function : ARexx DOpus5:ARexx/NewArc.dopus5 {Qp}
*/
parse arg portname .
if portname='' then /* in case they forgot */
portname='DOPUS.1'
address value portname
options results
options failat 21
lister query source
if rc>0 then
exit
parse var result handle . /* only need first source */
lister set handle busy on
dopus getstring '"Enter archive name to create." 31 "" Create|Cancel'
arcname=result
if arcname=='' | arcname='RESULT' then do
lister set handle busy off
exit
end
lister query handle path
winpath=result
arcname=winpath||arcname
ext=upper(right(arcname,4))
if ext='.LZX' then
address command 'LZX a "'arcname'" %'
else do
if ext~='.LHA' then
arcname=arcname'.lha'
call open('emptyarchive',arcname,'w') then do
call writech('emptyarchive','0'x)
call close('emptyarchive')
end
command protect 'NAME "'arcname'" CLEAR e'
lister set handle busy off
lister read handle winpath force